<?
/*
Company Name: Elixir Web Solution
Programmer Name: Rupinder Singh Bedi
Created On:4 Feb,2004
Description: Text Editor File
*/
if(!isset($contentbodypart))
{
$contentbodypart="";
}
else
{
	$contentbodypart=htmlspecialchars($contentbodypart);
}
if(!isset($editortype))
{
	if(strstr($HTTP_USER_AGENT,"MSIE"))
	{
		$editortype="advanced";
	}
	else
	{
		$editortype="simple";
	}
}
if($editortype=="advanced")
{
?>
<!----------------IE---------------->
	<script language="JavaScript">
		var alloweditsource = new Array();
		var tabview = new Array();
		var ae_fieldname = new Array();				
		var ae_imagedata = new Array();				
		var ae_imageurl = new Array();
		var ae_defaultfont = new Array();				
		var ae_baseurl = new Array();				
		var ae_breakonenter = new Array();
		var inc = '';
		var errlevel = 2;
		ae_breakonenter[1] = false;
		ae_baseurl[1] = "";
		ae_defaultfont[1] = "";
		tabview[1] = true;
		alloweditsource[1] = true;
		ae_imagedata[1] ='L%29%5DO7%2A%3A%3E%3ABUF%3FFN%2A9D%5DN0%5BI%21%24%3B%5BY%5EK2%2D%26%3F%5E%3E0%3A%2AF%5D%40H%5D%254ZI4H%2B%22%2EH%24R%21W%24%23%24';				
		ae_imageurl[1] = '%2Factivedit%2Fdemo%2Fimages';
	</script>
	<script language="JavaScript" src="<?=$editorpath?>/dhtmled.js"></script>
	<script LANGUAGE="Javascript" SRC="<?=$editorpath?>/compose.js"></script>
	<script language="JavaScript" id="clientEventHandlersJS" src="<?=$editorpath?>/editjs.php?editorpath=<?=$editorpath?>&ee=<?echo($uuid)?>"></script>
	<script language="JavaScript">
		if (errlevel == 2)
		{
			document.write("<BR>The file editjs.php did not load properly.<br>");
			document.write("<br><br>Please referesh the page");
		}
	</script>
		<style type="text/css">
			.disabled {filter:mask() mask(color=buttonshadow) dropshadow(offX=1,offY=1,color=buttonhighlight,positive=1);width:23;height:22;margin:1px;padding:0px;vertical-align:middle;border-width:0;visibility:visible;}
			.flat {width:23;height:22;margin:0px;padding:0px;vertical-align:middle;border-width:1px;border-color:buttonface;border-style:solid;visibility:visible;}		
			.outset {width:23;height:22;margin:0px;padding:0px;vertical-align:middle;border:1px solid;border-left-color:buttonhighlight;border-top-color:buttonhighlight;border-right-color:buttonshadow;border-bottom-color:buttonshadow;visibility:visible;}
			.inset {width:23;height:22;margin:0px;padding:0px;vertical-align:middle;border-width:1px;border-style:inset;visibility:visible;}
			.latched {width:23;height:22;margin:0px;padding:0px;vertical-align:middle;border-width:1px;border-style:inset;background-color:#DEFAEF;visibility:visible;}
			.spc {margin:0;padding:0;vertical-align:middle;}
			/* Don't allow the background color to be overridden by default style sheet*/
			TABLE.ae_tableClass {border:1px outset buttonface;cursor:default;background-color:buttonface;}
			TR.ae_trClass {background-color:buttonface;}
			TD.ae_tdClass {background-color:buttonface;}
			.tbSeparator {BORDER-LEFT: buttonshadow 1px solid; BORDER-RIGHT: buttonhighlight 1px solid; FONT-SIZE: 0px; HEIGHT: 22px; POSITION: relative; TOP: 0px; WIDTH: 1px}
		</style>
		<table cellpadding="0" cellspacing="0">
		<tr><td>
		<table align="center" bgcolor="buttonface" cellpadding="0" cellspacing="0" width="500" height="300" ondragstart="window.event.returnValue=false;" onselectstart="window.event.returnValue=false;" class="ae_tableClass" border=0>
			<tr class="ae_trClass">
				<td valign="bottom" colspan="2" class="ae_tdClass">
					<iframe src="<?=$editorpath?>/blank.htm" id="frame1" style="position:absolute; visibility:hidden; width:10; height:10; z-index:2;" vspace=0 hspace=0 marginheight="0" marginwidth="0" scrolling="no"></iframe>
					<span id="ae_tbar1" 
						onmouseover="ae_m_over(window.event.srcElement);"
						onmousedown="ae_m_down(window.event.srcElement);"
						onmouseup="ae_m_up(window.event.srcElement);"
						onmouseout="ae_m_out(window.event.srcElement);"
						ondragstart="window.event.returnValue=false;"
						onselectstart="window.event.returnValue=false;">
					<table cellspacing=2 cellpadding=0 border=0>
					<tr>
					<td width=10 valign="top"><img src="<?=$editorpath?>/editorimages/toolbar.gif" width="9" height="22" border="0" alt=""></td>
					<td>
						<nobr><img 
							alt="Cut"
							status="Cut the selected text and put it on the clipboard"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/cut.gif"
							type="btn" class="flat" cid="5003"><img 
							alt="Copy"
							status="Copy the selected text into the clipboard"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/copy.gif"
							type="btn" class="flat" cid="5002"><img 
							alt="Paste"
							status="Paste the contents of the clipboard into the workspace"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/paste.gif"
							type="btn" class="flat" cid="5032"><img 
							src="<?=$editorpath?>/editorimages/space.gif" class="spc"><wbr><img 
							alt="Redo"
							status="Redo the last operation"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/redo.gif"
							type="btn" class="flat" cid="5033"><img 
							alt="Undo"
							status="Undo the last operation"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/undo.gif"
							type="btn" class="flat" cid="5049"><img 
							src="<?=$editorpath?>/editorimages/space.gif" class="spc"><wbr><img 
							alt="Font"
							status="Change font and color"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/fgcolor.gif"
							type="btn" class="flat" cid="5009"><img 
							alt="Bold"
							status="Make selected text bold"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/bold.gif"
							type="btn" class="flat" cid="5000"><img 
							alt="Italic"
							status="Make selected text italic"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/italic.gif"
							type="btn" class="flat" cid="5023"><img 
							alt="Underline"
							status="Underline the selected text"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/under.gif"
							type="btn" class="flat" cid="5048">
							<img 
							src="<?=$editorpath?>/editorimages/space.gif" class="spc"><wbr>
<!-- 							<img 
							alt="Insert Image"
							status="Insert an image"
							onclick="insertimage1();"
							src="<?=$editorpath?>/editorimages/image.gif"
							type="btn" class="flat"> -->
							<img 
							alt="Insert Hyperlink"
							status="Insert a hyperlink on selected text"
							onclick="OpenHyperlinkWindow()"
							src="<?=$editorpath?>/editorimages/link.gif"
							type="btn" class="flat" cid="5016"><img 
							src="<?=$editorpath?>/editorimages/space.gif" class="spc"><wbr><img 
							alt="Decrease Indent"
							status="Reverse indent the current line"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/deindent.gif"
							type="btn" class="flat" cid="5031"><img 
							alt="Indent"
							status="Indent the current line"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/inindent.gif"
							type="btn" class="flat" cid="5018"><img 
							src="<?=$editorpath?>/editorimages/space.gif" class="spc"><wbr><img 
							alt="Align Left"
							status="Left justify the current line"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/left.gif"
							type="btn" class="flat" cid="5025"><img 
							alt="Center"
							status="Center the current line"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/center.gif"
							type="btn" class="flat" cid="5024"><img 
							alt="Align Right"
							status="Right justify the current line"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/right.gif"
							type="btn" class="flat" cid="5026"><img 
							alt="Bullets"
							status="Insert a bullet on current line"
							onclick="ae_onCommand(null, 1)"
							src="<?=$editorpath?>/editorimages/bullist.gif"
							type="btn" class="flat" cid="5051">
							</nobr>
							<!-- <a href="clipart.php?member=<?=$HTTP_SESSION_VARS["memberadmin"]?>&qstr=<?=urlencode($HTTP_SERVER_VARS["QUERY_STRING"])?>"><font face="Verdana" size="2"><b>Image Gallery</b></font></a> -->
							</td>
							</tr>
							
					</table>
					</span>
				</td>
				<td class="ae_tdClass">&nbsp;</td>
			</tr>
			<tr class="ae_trClass">
				<td class="ae_tdClass">&nbsp;
					
				</td>
				<td class="ae_tdClass" width="100%" height="100%">
					<OBJECT style="z-index:1;" classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A" width="100%" height="100%" id="DHTMLSafe1" >
						<PARAM NAME=ScrollbarAppearance VALUE=0>	
					</OBJECT>
					<script LANGUAGE="javascript" FOR="DHTMLSafe1" EVENT="ShowContextMenu">
						return ShowMenu(1);
					</script>
					<script LANGUAGE="javascript" FOR="DHTMLSafe1" EVENT="onkeypress">
						return ae_onkeypress(1);
					</script>
					<script LANGUAGE="javascript" FOR="DHTMLSafe1" EVENT="onmousedown">
						return ae_onmousedown(1);
					</script>
					<script LANGUAGE="javascript" FOR="DHTMLSafe1" EVENT="onclick">
						return ae_onclick(1);
					</script>
					<script LANGUAGE="javascript" FOR="DHTMLSafe1" EVENT="DisplayChanged">
						return ae_ondisplaychange(1);
					</script>
					<script LANGUAGE="javascript" FOR="DHTMLSafe1" EVENT="ContextMenuAction(itemIndex)">
						return ae_onmenuaction(itemIndex);
					</script>
				</td>
				<td class="ae_tdClass">&nbsp;</td>
			</tr>
			<tr class="ae_trClass">
				<td colspan="3" class="ae_tdClass">
					<table cellspacing=0 cellpadding=0 border=0 width="100%">
						<tr>
							<td><img src="<?=$editorpath?>/editorimages/spacer.gif"
								width="20" height="1"><img 
								src="<?=$editorpath?>/editorimages/normaltabon.gif" 
								border="0" 
								alt="" name="normaltab1" width="0" height="0"
								onclick="ae_editsourceinline(1, false)">								<img 
								src="<?=$editorpath?>/editorimages/htmltaboff.gif" 
								border="0" 
								alt="" name="htmltab1"
								onclick="ae_editsourceinline(1, 'yes')">
							</td>
							<td>
							<table cellpadding="0" cellspacing="0" align="right">
							<tr>
							<td>&nbsp;</td>
							<td align="right" style="text-align:right;width:100px;border-width: 1px;border-style: solid;border-color: threeddarkshadow white white threeddarkshadow;font:8pt Tahoma;">
					      		<nobr><span id="statusArea" style="width:95px;text-align:center;">Loading...</span></nobr>
							</td>
							</tr>
							</table>
							</td>
						</tr>					
					</table>
				</td>
			</tr>
			</table>
			</td></tr>
			</table>
		<textarea style="position:absolute; visibility:hidden;" id="ae_tx_content1" name="content"><?=$contentbodypart?></textarea>
		<script language="JavaScript">
		ae_initialize(1);
		</script>
<!------------/IE---------------------->
<?php
}
else
{
?>
<!------------simple editor---------------------->
<table align="center">
<tr>
	<td align="right" class="text">
	 Save as HTML: <input type=checkbox name="saveashtml" value="html">
	</td>
</tr>
<tr>
	<td>
	<textarea rows="15" cols="45" wrap="virtual" name="content"><?=$contentbodypart?></textarea>
	</td>
</tr>
</table>
<!------------/simple editor---------------------->
<?
}
?>
<input type="hidden" value="<?=$editortype?>" name=editortype>